package test;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * in testing
 *
 * @author user192
 */
@Documented
@Constraint(validatedBy = {UniqueValidator.class})
@Target({ElementType.TYPE, ElementType.FIELD})
@Retention(RUNTIME)
public @interface Unique {

    String message() default "{org.hibernate.validator.constraints.Unique.message}";

    String[] fields();

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}